package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Permission;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> queryList(QueryObject qo);

    void insertReletion(@Param("r_id") Long r_id, @Param("e_id") Long e_id);

    void deleteRelation(Long employeeId);

    List<Role> selectRolesByEmpId(Long emp_id);

    Employee checkByUsername(String username);

    List<Permission> selectPermissionByEmpId(Long empId);
}